Skip to content
This repository has been archived by the owner on Nov 20, 2024. It is now read-only.

Narrow type when using "isArray" function #27

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mathfox
Copy link

@mathfox mathfox commented Jun 15, 2024

The problem

Currently when you use the "isArray" function you have to manually cast the variable type to the Array.

Proposed changes

We should allow the TypeScript type inferrer to narrow the type of the variable.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant